In the related art, an apparatus that uses a combination of a light emitting element and a light detecting unit is known.
For example, in a light emitting apparatus disclosed in Patent Literature 1, a light detecting unit that detects light emitted from an LED chip and a temperature detecting unit that detects a temperature of the light detecting unit are provided in a package in which the LED chip is accommodated. By subtracting an output of the temperature detecting unit from an output of the light detecting unit, noise due to the temperature of the light detecting unit is removed from an output signal of the light detecting unit. In this apparatus, by feeding back the output of the light detecting unit to driving of the LED chip, stabilization of light emission of the LED chip is achieved. However, in this apparatus, a sensor function is not provided.
On the other hand, an apparatus disclosed in Patent Literature 2 is an optical encoder that use a combination of a light emitting element and a light detecting unit, and has a sensor function. In the optical encoder, a light detector and a recess are formed on a semiconductor substrate. A light source is disposed in the recess. Further, a slit is disposed on the recess, so that a light beam emitted from the light source passes through the slit, and then, is irradiated to an optical pattern for an encoder.